package eventStrategies.physicalModel;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventManager.IEventListener;
import events.physicalModel.AddCacheEvent;

public class AddCacheStrategy implements IEventListener {

	private IPhysicalDataModel physModel;
	private HashSet<String> eventTypes = new HashSet<String>();
	
	public AddCacheStrategy(IPhysicalDataModel physModel) {
		eventTypes.add("AddCache");		
		this.physModel = physModel;
	}

	public void handleEvent(AppEvent event) {
		AddCacheEvent fullEvent = (AddCacheEvent) event;		
		
		physModel.addCache(fullEvent.cache);		
	}

	public Set<String> getEventTypes() {
		return eventTypes;
	}

}
